/**
 * Created By zhangQ 2018/6/4
 * 子用户维护
 */

import axiosUtils from '@api/env/axiosEnv'

let customAxios = axiosUtils._initAxios()

export function querySubUserByPage (param) {
  return customAxios({
    url: '/common/subuser/querySubUserByPage',
    method: 'post',
    data: param
  })
}

export function querySubUserGrantPowerList (param) {
  return customAxios({
    url: '/common/subuser/querySubUserGrantPowerList',
    method: 'post',
    data: param
  })
}

export function querySubUserPowerList (param) {
  return customAxios({
    url: '/common/subuser/querySubUserPowerList',
    method: 'post',
    data: param
  })
}

/**
 * TODO(删除子用户)
 * @auther zhangQ
 * @date 2018/6/6 10:02
 */
export function delSubUser (param) {
  return customAxios({
    url: '/common/subuser/delSubUser',
    method: 'post',
    data: param
  })
}

export function saveSubUser (param) {
  return customAxios({
    url: '/common/subuser/saveSubUser',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    method: 'post',
    data: param
  })
}
